package com.applet.common.exection;

import com.applet.common.constant.ResultConstant;
import lombok.Data;

/**
 * @projectName: lease
 * @package: com.atguigu.lease.common.exception
 * @className: RoomExistsException
 * @author: Shen Haitao
 * @description: TODO
 * @date: 2024/11/1 18:20
 * @version: 1.0
 */
@Data
public class NumberIsFullException extends RuntimeException{

    private Integer code;

    public NumberIsFullException(Integer code, String message){
        super(message);
        this.code = code;
    }

    public NumberIsFullException(ResultConstant resultConstant){
        super(resultConstant.getMessage());
        this.code = resultConstant.getCode();
    }
}
